#import <Foundation/Foundation.h>
@interface AllinRSAUtil : NSObject

// return base64 encoded string
+ (NSString *)encryptString:(NSString *)str publicKey:(NSString *)pubKey;
+ (NSString *)encryptString:(NSString *)str publicKey:(NSString *)pubKey padding:(SecPadding)padding;
// return raw datax
+ (NSData *)encryptData:(NSData *)data publicKey:(NSString *)pubKey padding:(SecPadding)padding;


+ (NSString *)decryptString:(NSString *)str privateKey:(NSString *)privKey;
+ (NSString *)decryptString:(NSString *)str privateKey:(NSString *)privKey padding:(SecPadding)padding isPKCS8:(BOOL)isPKCS8;
+ (NSData *)decryptData:(NSData *)data privateKey:(NSString *)privKey padding:(SecPadding)padding  isPKCS8:(BOOL)isPKCS8;
@end
